<template>
	<view class="content">
		<view class="phone">
			<text class="phone_text">联系方式</text>
			<input class="phone_input" v-model="phone" type="text" placeholder="请输入您的电话号码" value="" />
		</view>
		<view class="back_info">
			<textarea class="back_input" value="" v-model="content" placeholder="请描述您要反馈的内容" />
		</view>
		<view class="submit_btn" @tap="submitBtn">提交</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				phone: '',
				content: ''
			}
		},
		methods: {
			submitBtn(){
				let that = this
				that.$api.request('/api/webUserFankui/add','',{
					orderNum: 1,//反馈编号
					userId: uni.getStorageSync("userId"), //用户id
					type: 1, //反馈栏目
					content: that.content, //反馈内容
					phone: that.phone
				}, failres => {
					uni.showToast({
						title: failres.msg,
						icon: "none"
					});
				}).then(res => {
					uni.showToast({
					title: '提交成功！',
					duration: 2000
					});
					// 反馈成功后返回
					uni.switchTab({
						url: '../my/my'
					})
				})
				
			}
		}
	}
</script>

<style lang="scss">
	.content{
		width: 100%;
		background: #F5F5F5;
		min-height: 100vh;
		.phone{
			width: 100%;
			background: #ffffff;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 10rpx 0;
			margin-top: 20rpx;
			.phone_text{
				padding-left: 20rpx;
				font-size: 32rpx;
				color: #333333;
			}
			.phone_input{
				border: none;
				outline: none;
				text-align: right;
				margin-right: 20rpx;
			}
		}
		.back_info{
			width: 100%;
			background: #ffffff;
			padding: 20rpx 0;
			margin-top: 20rpx;
			.back_input{
				width: 94%;
				min-height: 200rpx;
				margin: 0 auto;
				outline: none;
				border: none;
			}
		}
		.publish{
			width: 200rpx;
			height: 200rpx;
			background: #EFEFEF;
			position: relative;
			margin-bottom: 80rpx;
			margin-left: 30rpx;
			margin-top: 30rpx;
			.publish_add{
				width: 100rpx;
				height: 100rpx;
				position: absolute;
				left: 50rpx;
				top: 50rpx;
			}
		}
		.submit_btn{
			width: 100%;
			height: 100rpx;
			background: #0091FF;
			color: #FFFFFF;
			line-height: 100rpx;
			text-align: center;
			position: fixed;
			bottom: 0;
			left: 0;
		}
	}
</style>
